<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require 'db_con.php';
    $e_name=$_REQUEST['e_name'];
    $e_dept=$_REQUEST['e_dept'];   
    $e_img=$_REQUEST['e_img'];
    $date_of_birth=$_REQUEST['date_of_birth'];
    $date_of_entry=$_REQUEST['date_of_entry'];
    $sql="insert into tb_emp(e_name,e_dept,e_img,date_of_birth,date_of_entry) values('{$e_name}','{$e_dept}','{$e_img}','{$date_of_birth}','{$date_of_entry}');";
    $rs=$db->query($sql);
    if ($rs==true)
    {
        header("Location:index.php");
    }
    else
    {
        echo '<script type="text/javascript"> ';
        echo 'alert("留言失败！")';
        echo 'window.location.href="index.php"';
        echo '</script>';
    }
    
    
   
